package bean;

public class Rectangle {
     private double width;//矩形的宽
     private double length;//矩形的长
	public double getWidth() {
		return width;
	}
	public void setWidth(double width) {
		this.width = width;
	}
	public double getLength() {
		return length;
	}
	public void setLength(double length) {
		this.length = length;
	}
	//计算矩形面积的方法
    public double calculateArea(){
    	return width * length;
    } 
    //计算矩形周长的方法
    public double calculatePerimeter(){
    	return 2 * (width + length);
    }
}
